package easy

import "strconv"

func AddStrings(num1 string, num2 string) string {
	i := len(num1) - 1
	j := len(num2) - 1
	carry := 0
	ans := ""
	for i >= 0 || j >= 0 || carry != 0 {
		var x, y int
		if i >= 0 {
			x = int(num1[i] - '0')
		}
		if j >= 0 {
			y = int(num2[j] - '0')
		}
		result := x + y + carry
		ans = strconv.Itoa(result%10) + ans
		carry = result / 10
		i--
		j--
	}
	return ans
}
